package com.tsd.core.openweixin.model.wxpay;


import com.tsd.core.openweixin.utils.AdapterCDATA;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

/**
 * 微信红包发送结果响应
 *
 * @author wudw
 */
@XmlRootElement(name = "xml")
@XmlAccessorType(XmlAccessType.FIELD)
public class SendRedPackResponse {
    @XmlElement(name = "return_code")
    @XmlJavaTypeAdapter(AdapterCDATA.class)
    private String returnCode;//SUCCESS/FAIL ，此字段是通信标识，非交易标识，交易是否成功需要查看result_code来判断

    @XmlElement(name = "return_msg")
    @XmlJavaTypeAdapter(AdapterCDATA.class)
    private String returnMsg;
//	以下字段在return_code为SUCCESS的时候有返回

//	@XmlElement(name = "nonce_str")
//    @XmlJavaTypeAdapter(AdapterCDATA.class)
//	private String nonceStr;

    @XmlElement(name = "sign")
    @XmlJavaTypeAdapter(AdapterCDATA.class)
    private String sign;//签名


    @XmlElement(name = "result_code")
    @XmlJavaTypeAdapter(AdapterCDATA.class)
    private String resultCode;//SUCCESS/FAIL

    @XmlElement(name = "err_code")
    @XmlJavaTypeAdapter(AdapterCDATA.class)
    private String errCode;

    @XmlElement(name = "err_code_des")
    @XmlJavaTypeAdapter(AdapterCDATA.class)
    private String errCodeDes;

//	以下字段在return_code和result_code都为SUCCESS的时候有返回

    @XmlElement(name = "mch_billno")
    @XmlJavaTypeAdapter(AdapterCDATA.class)
    private String mchBillno;//商户订单号（每个订单号必须唯一） 组成：mch_id+yyyymmdd+10位一天内不能重复的数字


    @XmlElement(name = "mch_id")
    @XmlJavaTypeAdapter(AdapterCDATA.class)
    private String mchId;

    @XmlElement(name = "wxappid")
    @XmlJavaTypeAdapter(AdapterCDATA.class)
    private String wxappid;//所有appid应该为公众号的appid（在mp.weixin.qq.com申请的

    @XmlElement(name = "re_openid")
    @XmlJavaTypeAdapter(AdapterCDATA.class)
    private String re_openid;//用户在wxappid下的openid

    @XmlElement(name = "total_amount")
    @XmlJavaTypeAdapter(AdapterCDATA.class)
    private String totalAmount;//付款金额，单位分

    @XmlElement(name = "send_listid")
    @XmlJavaTypeAdapter(AdapterCDATA.class)
    private String sendListid;//红包订单的微信单号

    public String getReturnCode() {
        return returnCode;
    }

    public void setReturnCode(String returnCode) {
        this.returnCode = returnCode;
    }

    public String getReturnMsg() {
        return returnMsg;
    }

    public void setReturnMsg(String returnMsg) {
        this.returnMsg = returnMsg;
    }

    public String getSign() {
        return sign;
    }

    public void setSign(String sign) {
        this.sign = sign;
    }

    public String getResultCode() {
        return resultCode;
    }

    public void setResultCode(String resultCode) {
        this.resultCode = resultCode;
    }

    public String getErrCode() {
        return errCode;
    }

    public void setErrCode(String errCode) {
        this.errCode = errCode;
    }

    public String getErrCodeDes() {
        return errCodeDes;
    }

    public void setErrCodeDes(String errCodeDes) {
        this.errCodeDes = errCodeDes;
    }

    public String getMchBillno() {
        return mchBillno;
    }

    public void setMchBillno(String mchBillno) {
        this.mchBillno = mchBillno;
    }

    public String getMchId() {
        return mchId;
    }

    public void setMchId(String mchId) {
        this.mchId = mchId;
    }

    public String getWxappid() {
        return wxappid;
    }

    public void setWxappid(String wxappid) {
        this.wxappid = wxappid;
    }

    public String getRe_openid() {
        return re_openid;
    }

    public void setRe_openid(String re_openid) {
        this.re_openid = re_openid;
    }

    public String getTotalAmount() {
        return totalAmount;
    }

    public void setTotalAmount(String totalAmount) {
        this.totalAmount = totalAmount;
    }

    public String getSendListid() {
        return sendListid;
    }

    public void setSendListid(String sendListid) {
        this.sendListid = sendListid;
    }

}
